#pragma once

/*this struct could own a motion ,which could do some things,such as http*/
typedef struct Task {
	void (*function)(void* arg);
	void* arg;
	/*int data;*/

	Task* next;
}Task;

typedef struct TaskQueue {
	Task* rear;
	Task* front;
	int queuecapbality, currentsize;
}TaskQueue;

bool isEmpty(TaskQueue* taskqueue);

TaskQueue* initTaskQueue();
void destoryTaskQueue(TaskQueue* taskqueue);
/*
	if queue have't task ,it will return task
*/
Task* getTask(TaskQueue* taskqueue);

/*
	
*/
void addTask(TaskQueue* taskqueue, Task* task);